package main

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func pong(c *gin.Context) {
	c.JSON(http.StatusOK, map[string]string{
		"message": "pong",
	})
}
func main() {
	//实例化一个gin的server对象

	r := gin.Default()
	r.GET("/ping", pong)
	_ = r.Run(":8024") // listen and serve on 0.0.0.0:8080
}
